package com.sinosoft.hydra.um.domain.permission;

import com.alibaba.fastjson.annotation.JSONField;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

@Entity
@Table(name="T_MESSAGE_RECEIVER")
public class TMessageReceiver implements Serializable {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column T_MESSAGE_RECEIVER.ID
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */

    @Id
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    @Column(name="ID")
    private String id;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column T_MESSAGE_RECEIVER.RECEIVER
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */

    @Column(name="RECEIVER")
    private String receiver;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column T_MESSAGE_RECEIVER.RECEIVER_TYPE
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */

    @Column(name="RECEIVER_TYPE")
    private String receiverType;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column T_MESSAGE_RECEIVER.READ_STATUS
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */

    @Column(name="READ_STATUS")
    private String readStatus;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column T_MESSAGE_RECEIVER.RECEIVER_STATUS
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */

    @Column(name="RECEIVER_STATUS")
    private String receiverStatus;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column T_MESSAGE_RECEIVER.READ_TIME
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */
    @Column(name="READ_TIME")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date readTime;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column T_MESSAGE_RECEIVER.MESSAGE_ID
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */
    @ManyToOne
    @JoinColumn(name="MESSAGE_ID")
    private TMessage tMessage;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table T_MESSAGE_RECEIVER
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */
    private static final long serialVersionUID = 1L;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column T_MESSAGE_RECEIVER.ID
     *
     * @return the value of T_MESSAGE_RECEIVER.ID
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */
    public String getId() {
        return id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column T_MESSAGE_RECEIVER.ID
     *
     * @param id the value for T_MESSAGE_RECEIVER.ID
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */
    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column T_MESSAGE_RECEIVER.RECEIVER
     *
     * @return the value of T_MESSAGE_RECEIVER.RECEIVER
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */
    public String getReceiver() {
        return receiver;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column T_MESSAGE_RECEIVER.RECEIVER
     *
     * @param receiver the value for T_MESSAGE_RECEIVER.RECEIVER
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */
    public void setReceiver(String receiver) {
        this.receiver = receiver == null ? null : receiver.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column T_MESSAGE_RECEIVER.RECEIVER_TYPE
     *
     * @return the value of T_MESSAGE_RECEIVER.RECEIVER_TYPE
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */
    public String getReceiverType() {
        return receiverType;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column T_MESSAGE_RECEIVER.RECEIVER_TYPE
     *
     * @param receiverType the value for T_MESSAGE_RECEIVER.RECEIVER_TYPE
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */
    public void setReceiverType(String receiverType) {
        this.receiverType = receiverType == null ? null : receiverType.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column T_MESSAGE_RECEIVER.READ_STATUS
     *
     * @return the value of T_MESSAGE_RECEIVER.READ_STATUS
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */
    public String getReadStatus() {
        return readStatus;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column T_MESSAGE_RECEIVER.READ_STATUS
     *
     * @param readStatus the value for T_MESSAGE_RECEIVER.READ_STATUS
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */
    public void setReadStatus(String readStatus) {
        this.readStatus = readStatus == null ? null : readStatus.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column T_MESSAGE_RECEIVER.RECEIVER_STATUS
     *
     * @return the value of T_MESSAGE_RECEIVER.RECEIVER_STATUS
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */
    public String getReceiverStatus() {
        return receiverStatus;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column T_MESSAGE_RECEIVER.RECEIVER_STATUS
     *
     * @param receiverStatus the value for T_MESSAGE_RECEIVER.RECEIVER_STATUS
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */
    public void setReceiverStatus(String receiverStatus) {
        this.receiverStatus = receiverStatus == null ? null : receiverStatus.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column T_MESSAGE_RECEIVER.READ_TIME
     *
     * @return the value of T_MESSAGE_RECEIVER.READ_TIME
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */
    public Date getReadTime() {
        return readTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column T_MESSAGE_RECEIVER.READ_TIME
     *
     * @param readTime the value for T_MESSAGE_RECEIVER.READ_TIME
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */
    public void setReadTime(Date readTime) {
        this.readTime = readTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column T_MESSAGE_RECEIVER.MESSAGE_ID
     *
     * @return the value of T_MESSAGE_RECEIVER.MESSAGE_ID
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */
    public TMessage gettMessage() {
        return tMessage;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column T_MESSAGE_RECEIVER.MESSAGE_ID
     *
     * @param tMessage the value for T_MESSAGE_RECEIVER.MESSAGE_ID
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */
    public void settMessage(TMessage tMessage) {
        this.tMessage = tMessage;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table T_MESSAGE_RECEIVER
     *
     * @mbggenerated Mon Aug 31 12:12:57 CST 2015
     */

    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", receiver=").append(receiver);
        sb.append(", receiverType=").append(receiverType);
        sb.append(", readStatus=").append(readStatus);
        sb.append(", receiverStatus=").append(receiverStatus);
        sb.append(", readTime=").append(readTime);
        sb.append(", tMessage=").append(tMessage);
        sb.append("]");
        return sb.toString();
    }
}